<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>注册</title>
<script type="text/javascript">
	function check(){
		if(form2.name.value==""){
			alert("请输入用户名");
			form2.name.focus();
		}else if(form2.password.value.length<4){
			alert("密码不得小于四位");
			form2.password.focus();
		}else if(form2.password.value.length>6){
			alert("密码不得大于六位");
			form2.password.focus();
		}else{form2.submit();}
		
	}
</script>
</head>
<body>
	<h3>欢迎您注册为本网站会员</h3>
	<form action="top.jsp" method="post" name="form2">
		<table>
			<tr>
				<td>用户名:</td>
				<td><input type="text" name="name"></td>
				<td style="color:red;">*用户名不得为空</td>
			</tr>
    		<tr>
				<td>密码：</td>
				<td><input type="password" name="password"></td>
				<td style="color:red;">*密码不得大于6位小于四位</td>
			</tr>
	    	<tr>
				<td>性别：</td>
				<td><input type="radio" name="gender" value="1">男</td>
				<td><input type="radio" name="gender" value="2">女</td>
			</tr>
			<tr>
				<td><input type="button" value="注册" onclick="check()"></td>
				<td><input type="reset" value="取消"></td>
				<td></td>
			</tr>
		</table>
	</form>
</body>
</html>